﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using static System.Windows.Forms.VisualStyles.VisualStyleElement;

namespace AgvDemo
{
    public partial class StationAddForm : Form
    {
        //委托
        public delegate void AddCardDelegate(int x, int y, int cardId);
        public event AddCardDelegate AddCardId;

       
        public StationAddForm(int x, int y)
        {
            InitializeComponent();
            this.MaximizeBox = false;
            txtAcc.Text = x.ToString();
            txtPass.Text = y.ToString();

            txtCard.Focus();

          
        }


        private void btnSure_Click(object sender, EventArgs e)
        {
            if (txtCard.Text != "")
            {
                AddCardId(int.Parse(txtAcc.Text), int.Parse(txtPass.Text), int.Parse(txtCard.Text));
                this.Close();
            }
            else
                MessageBox.Show("卡号不能为空！！", "提示");



        }
    
    }
}
